Open
Conversation
To get a baseline for current ts-morph implementation
✅ Deploy Preview for cedarjs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Greptile SummaryAdded comprehensive test infrastructure and benchmarking script to establish baseline metrics before migrating from ts-morph to oxc-parser. Key Additions:
Test Coverage:
The tests provide a safety net for refactoring and a baseline for comparing performance improvements when switching parsers. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant Bench as benchmark.mts
participant RWP as RWProject
participant Tests as Test Suite
participant Fixtures as Test Fixtures
Note over Dev,Fixtures: PR Setup: Baseline Tests & Benchmarks
Dev->>Fixtures: Create structure-test-project
Fixtures-->>Tests: Provide test data
Dev->>Tests: Run test suite
Tests->>RWP: getProject(projectRoot)
RWP-->>Tests: Project instance
Tests->>RWP: Verify API contract
Tests->>RWP: Extract diagnostics
Tests->>RWP: Test extractors
Tests->>RWP: Integration tests
Tests->>RWP: Snapshot serialization
RWP-->>Tests: Results
Tests-->>Dev: Pass/Fail with snapshots
Dev->>Bench: Run benchmark script
Note over Bench: Warmup phase (2 iterations)
loop Warmup
Bench->>RWP: new RWProject()
RWP-->>Bench: Instance
Bench->>RWP: collectDiagnostics()
RWP-->>Bench: Diagnostics
end
Note over Bench: Measurement phase (10 iterations)
loop Measurements
Bench->>Bench: forceGC()
Bench->>RWP: new RWProject() [measure init]
RWP-->>Bench: Instance + timing
Bench->>RWP: collectDiagnostics() [cold]
RWP-->>Bench: Diagnostics + timing
Bench->>RWP: collectDiagnostics() [warm]
RWP-->>Bench: Cached results + timing
Bench->>Bench: Track memory delta
end
Bench->>Bench: calculateStats()
Bench-->>Dev: Performance report (mean/median/p95)
|
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run-many -t build |
❌ Failed | 4s | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-01-03 12:58:05 UTC
0f0e039 to
aa1c62d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

In preparation for switching over to oxc-format I need baseline perf metrics and good test coverage